package com.ruoyi.insect.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.insect.mapper.DiseaseInfoMapper;
import com.ruoyi.insect.domain.DiseaseInfo;
import com.ruoyi.insect.service.IDiseaseInfoService;

/**
 * 病虫害信息查询Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-13
 */
@Service
public class DiseaseInfoServiceImpl implements IDiseaseInfoService 
{
    @Autowired
    private DiseaseInfoMapper diseaseInfoMapper;

    /**
     * 查询病虫害信息查询
     * 
     * @param id 病虫害信息查询主键
     * @return 病虫害信息查询
     */
    @Override
    public DiseaseInfo selectDiseaseInfoById(Long id)
    {
        return diseaseInfoMapper.selectDiseaseInfoById(id);
    }

    /**
     * 查询病虫害信息查询列表
     * 
     * @param diseaseInfo 病虫害信息查询
     * @return 病虫害信息查询
     */
    @Override
    public List<DiseaseInfo> selectDiseaseInfoList(DiseaseInfo diseaseInfo)
    {
        return diseaseInfoMapper.selectDiseaseInfoList(diseaseInfo);
    }

    /**
     * 新增病虫害信息查询
     * 
     * @param diseaseInfo 病虫害信息查询
     * @return 结果
     */
    @Override
    public int insertDiseaseInfo(DiseaseInfo diseaseInfo)
    {
        return diseaseInfoMapper.insertDiseaseInfo(diseaseInfo);
    }

    /**
     * 修改病虫害信息查询
     * 
     * @param diseaseInfo 病虫害信息查询
     * @return 结果
     */
    @Override
    public int updateDiseaseInfo(DiseaseInfo diseaseInfo)
    {
        return diseaseInfoMapper.updateDiseaseInfo(diseaseInfo);
    }

    /**
     * 批量删除病虫害信息查询
     * 
     * @param ids 需要删除的病虫害信息查询主键
     * @return 结果
     */
    @Override
    public int deleteDiseaseInfoByIds(Long[] ids)
    {
        return diseaseInfoMapper.deleteDiseaseInfoByIds(ids);
    }

    /**
     * 删除病虫害信息查询信息
     * 
     * @param id 病虫害信息查询主键
     * @return 结果
     */
    @Override
    public int deleteDiseaseInfoById(Long id)
    {
        return diseaseInfoMapper.deleteDiseaseInfoById(id);
    }
}
